<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title>还款管理</title>
</head>
<body>
<div class="contant">
<link href="__CSS__/express.css" rel="stylesheet" />
<div class="row">
        <div class="top">合规部>还款管理</div>
        <div class="content applylist">
            <div class="box">
                <h1>还款管理</h1>
                <div class="list-block">
                   <div class="row" id='import' style="display:none;">
                        <a href="{:U('Bank/Repay_import')}"><button class="addcus"><span></span>导入</button></a>
                    </div>
                    <form action='{:U("Bank/Repay_index")}' method="get">
                      <div class="row" style="display:none;" id='search'>
                       <label>用户名称:</label> <input type="text" name="user_name" placeholder="请输入名称" value={$_GET['user_name']} >
                    <!--    <label>手机号:</label> <input type="text" name="telephone" placeholder="请输入手机号" value={$_GET['telephone']} > -->
                        <label>投诉时间:</label> <input type="date" name="create_time_beg" placeholder="请选择时间" value={$_GET['create_time_beg']}><em>~</em>
                        <input type="date" name="create_time_end" placeholder="请选择时间" value={$_GET['create_time_end']}>
                        <button class="search" type='submit'><img src="__IMG__/search.png" alt="">查询</button>
                     </div>
                    </form>
                    <div class="row">
                        <table class="list">
                            <tr>

                                <th>编号</th> <th>姓名</th> <th>身份证号</th> <th>银行</th> <th>卡号</th> <th>状态</th>
                                <th>导入时间</th><th>操作</th>
                            </tr>
                            <volist name='list' id='list'>
                                 <tr>

                                    <td>{$i}</td>
                                    <td>{$list.user_name}</td>
                                    <td>{$list.identity_no}</td>
                                    <td>{$list.bank_name}</td>
                                    <td>{$list.bank_card}</td>
                                    <td>已完成</td>
                                    <td>{$list.add_time|date='Y-m-d H:i',###}</td>
                                    <td>
                                     <switch name='list.status'>
                                        <case value='0'><a href="{:U('Bank/set_status', array('id' => $list['id'],'status'=>1))}">未寄送</a></case>
                                        <case value='1'>录入快递</case>
                                        <case value='2'><a href="{:U('Bank/set_status', array('id' => $list['id'],'status'=>3))}">快递确认</a></case>
                                        <case value='3'><button class="actBtn btn btn-default btn_50" data-id='{$list.id}' onclick="show('white_content_small','black_overlay')">照片确认</button></case>
                                     </switch>
                                    </td>
                             </tr>
                            </volist>

                        </table>

                    </div>
                    {$page}
                </div>
            </div>
        </div>
    </div>
<div id='black_overlay'>
     <div id='white_content_small' class="express" style="display: none;">
          <form action='{:U("Bank/confirm_img")}' method="post">
                <h1 style="text-align: center;font-size: 26px;margin-top: 3%;">照片确认<span class="close" onclick="hideDiv('white_content_small','black_overlay')">关闭</span></h1>
                    <div class="row" style="margin-left: 30%">

                        <label class="inputfile" style="margin-top: 10%;"><img id='fristImg' name='fristImg' src="" width="200" height="200">
                        <input type='hidden' id='one' name='img' value=''/>
                        <input type="file" id="fileId1"  name="file[]" class="uploadA" style="margin-left: 30%">上传图片</label>
                        <input type='hidden' id='repay_id' name='id' value=''/>
                        <button type="submit" class="actBtn btn btn-default btn_50" style="margin-left: 30%">提交</button>
                     </div>
           </form>
     </div>
</div>
</div>
    <script src="__JS__/ajaxfileupload.js"></script>
    <script language="javascript" type="text/javascript">
       function show() {
       document.getElementById("black_overlay").style.display ="block";
       document.getElementById("white_content_small").style.display ="block";
       }
       function hideDiv() {
       document.getElementById("black_overlay").style.display ='none';
       document.getElementById("white_content_small").style.display ='none';
      }
    </script>

    <script type="text/javascript">
      var type={$type|default=0};
       if(type==1){
          $('#import').css('display','block');
           $('#search').css('display','block');
       }
       $('.actBtn').click(function(){
                var id = $(this).data('id');
                $('.express').css('display','block');
                $("#repay_id").attr("value",id);
            });

         $('.uploadA').change(function(){
            $.ajaxFileUpload({
                url:'{:U("Upload/logo")}',//处理图片脚本
                secureuri: false,
                fileElementId :'fileId1',//file控件id
                dataType : 'text',
                success: function (data){
                    $("#fristImg").attr("src",data);
                    $("#one").attr("value",data);
                },
                error: function(data){
                    alert(data+"333");
                }
            })
        })
    </script>
</body>
</html>